/**
 * Copyright (C), 2020, 安徽贝慕信息科技有限公司
 * FileName: ServiceResourceService
 * Author:   Allen
 * Date:     2020/8/1 22:53
 * Description: 服务资源信息处理服务类
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.bim.marvel.openapi.core.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bim.marvel.openapi.client.query.ServiceResourceQuery;
import com.bim.marvel.openapi.core.dao.ServiceResourceDAO;
import com.bim.marvel.openapi.core.entity.ServiceResourceDO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

/**
 * 〈服务资源信息处理服务类〉
 *
 * @author Allen
 * @date 2020/8/26
 * @since 1.0.0
 */
@Service
public class ServiceResourceService extends ServiceImpl<ServiceResourceDAO, ServiceResourceDO> {

    /**
     * 保存服务资源信息
     * @param serviceResourceQuery 服务资源入参
     * @return 保存结果
     */
    public Boolean saveOrUpdateServiceResource(ServiceResourceQuery serviceResourceQuery) {
        ServiceResourceDO serviceResourceDO = new ServiceResourceDO();
        BeanUtils.copyProperties(serviceResourceQuery, serviceResourceDO);
        return saveOrUpdate(serviceResourceDO);
    }
}
